import tkinter
# entry 输入文字的条子
window = tkinter.Tk()
window.title = ('窗口名字')
window.geometry("200x200")  # 设置窗口尺寸

var1 = tkinter.StringVar()

l=tkinter.Label(window,text='empyt',bg='yellow',width=15)
l.pack()

def print_selection():
    l.config(text='you have selected'+var1.get())

r1=tkinter.Radiobutton(window,bg='yellow',text='Option A',variable=var1,value='A',command = print_selection)
r1.pack()
r2=tkinter.Radiobutton(window,bg='yellow',text='Option B',variable=var1,value='B',command = print_selection)
r2.pack()
r3=tkinter.Radiobutton(window,bg='yellow',text='Option C',variable=var1,value='C',command = print_selection)
r3.pack()
window.mainloop()




